home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / sv4Lib.rules < prev    next >
Text File  |  1995-07-12  |  3KB  |  111 lines

  1. XCOMM $XConsortium: sv4Lib.rules,v 1.14 94/04/09 12:00:10 rws Exp $
  2.  
  3. /*
  4.  * SVR4 shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation NO
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef /**/
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef /**/
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <sv4Lib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -G -z text
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #if HasGcc2
  27. #define PositionIndependentCFlags -fpic
  28. #else
  29. #define PositionIndependentCFlags -K PIC
  30. #endif
  31. #endif
  32. #ifndef PositionIndependentCplusplusFlags
  33. #if HasGcc2ForCplusplus
  34. #define PositionIndependentCplusplusFlags -fpic
  35. #else
  36. #define PositionIndependentCplusplusFlags -K PIC
  37. #endif
  38. #endif
  39.  
  40. /*
  41.  * InstallSharedLibrary - generate rules to install the shared library.
  42.  */
  43. #ifndef InstallSharedLibrary
  44. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  45. install:: Concat(lib,libname.so.rev)                     @@\
  46.     MakeDir($(DESTDIR)dest)                        @@\
  47.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  48.     $(RM) Concat($(DESTDIR)dest/lib,libname.so)            @@\
  49.     $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
  50.  
  51. #endif /* InstallSharedLibrary */
  52.  
  53. /*
  54.  * InstallSharedLibraryData - generate rules to install the shared library data
  55.  */
  56. #ifndef InstallSharedLibraryData
  57. #define    InstallSharedLibraryData(libname,rev,dest)
  58. #endif /* InstallSharedLibraryData */
  59.  
  60.  
  61. /*
  62.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  63.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  64.  * global constructors to be called.
  65.  */
  66. #ifndef SharedCplusplusLibraryTarget
  67. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  68. AllTarget(Concat(lib,libname.so.rev))                    @@\
  69.                                     @@\
  70. Concat(lib,libname.so.rev): solist                    @@\
  71.     $(RM) $@                            @@\
  72.     $(CXXLINK) -o $@ $(SHLIBLDFLAGS) -h $@ solist need_libs        @@\
  73.     $(RM) Concat(lib,libname.so)                    @@\
  74.     $(LN) $@ Concat(lib,libname.so)                    @@\
  75.                                     @@\
  76. clean::                                    @@\
  77.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  78.  
  79. #endif /* SharedCplusplusLibraryTarget */
  80.  
  81. /*
  82.  * SharedLibraryTarget - generate rules to create a shared library;
  83.  * build it into a different name so that we do not hose people by having
  84.  * the library gone for long periods.
  85.  */
  86. #ifndef SharedLibraryTarget
  87. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  88. AllTarget(Concat(lib,libname.so.rev))                    @@\
  89.                                     @@\
  90. Concat(lib,libname.so.rev):  solist                    @@\
  91.     $(RM) $@~                            @@\
  92.     (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))        @@\
  93.     $(RM) $@                             @@\
  94.     $(MV) $@~ $@                            @@\
  95.     $(RM) Concat(lib,libname.so)                    @@\
  96.     $(LN) $@ Concat(lib,libname.so)                    @@\
  97.     LinkBuildLibrary($@)                        @@\
  98.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  99.                                     @@\
  100. clean::                                    @@\
  101.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  102.  
  103. #endif /* SharedLibraryTarget */
  104.  
  105. /*
  106.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  107.  */
  108. #ifndef SharedLibraryDataTarget
  109. #define SharedLibraryDataTarget(libname,rev,salist)
  110. #endif /* SharedLibraryTarget */
  111.